<?php

/** libraries
 * http://docs.joomla.org/JToolBarHelper
 */

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

// import Joomla view library
jimport('joomla.application.component.view');

class bgViewbg extends JView
{
    public $area;
    public $pref;
	// Overwriting JView display method
	function display($tpl = null) 
	{
        $model = $this->getModel();
        $task = &JRequest::getVar('task');
        switch($task){            
            case 'statistic_top':
                $facility = JRequest::getVar('facility');
                $model->statisticTop($facility);
            break;
            
            default :
                $this->area = $model->getArea();
                $this->pref = $model->getPrefs();
                $this->setLayout('default');
        }
        
		parent::display();
	}
}




